package com.asialjim.wechat.message;

import com.asialjim.wechat.core.bean.WeChatBean;

/**
 * <h1><em>ASIAL JIM JAVA DOC</em></h1><hr/>
 * <h2>CLASS DESCRIPTION <i>[ NAME: WeChatMessageService ]</i></h2><strong>
 * <p> we-chat message service
 * </strong><p><p><em>Copyright &copy; Asial Jim Co., LTD</em><hr/>
 *
 * @author Asial Jim &nbsp;&nbsp; <span>Email:<a href="mailto:asialjim@hotmail.com">asialjim@hotmail.com</a> &nbsp;&nbsp; <a href="asialjim@qq.com">asialjim@qq.com</a></span>
 * @version 1.0.0
 * @since 2021/3/11   &nbsp;&nbsp; JDK 8
 */
public interface WeChatMessageService extends WeChatBean {

    /**
     * <h3>METHOD DESCRIPTION <i>[ NAME: checkService ]</i></h3>
     * 腾讯服务器连接验签
     * @param signature {@link String signature}
     * @param timestamp {@link String timestamp}
     * @param nonce {@link String nonce}
     * @param echostr {@link String echostr}
     * @return {@link Boolean result}
     * @author Asial Jim &nbsp;&nbsp; <span>Email: &nbsp;&nbsp; <a href="mailto:asialjim@hotmail.com">asialjim@hotmail.com</a> &nbsp;&nbsp; <a href="asialjim@qq.com">asialjim@qq.com</a></span>
     * @since 2021/3/11 21:50
     */
    boolean checkService(String signature, String timestamp, String nonce, String echostr);

    /**
     * <h3>METHOD DESCRIPTION <i>[ NAME: handle ]</i></h3>
     * handle we-chat message
     * @param callMessage {@link BaseWeChatCallMessage we-chat call message}
     * @param signature {@link String signature}
     * @param timestamp {@link String timestamp}
     * @param nonce {@link String nonce}
     * @param echostr {@link String echostr}
     * @return {@link Boolean result}
     * @author Asial Jim &nbsp;&nbsp; <span>Email: &nbsp;&nbsp; <a href="mailto:asialjim@hotmail.com">asialjim@hotmail.com</a> &nbsp;&nbsp; <a href="asialjim@qq.com">asialjim@qq.com</a></span>
     * @since 2021/3/11 21:51
     */
    String handle(BaseWeChatCallMessage callMessage, String signature, String timestamp, String nonce, String echostr);
}